go
--use northwind
go
--drop database shoppingcart2
go
create database shoppingcart2
go
use shoppingcart2
go
create table users
(
	userName varchar(20) primary key,
	[password] varchar(20)
)
go
create table products
(
	ProductID varchar(10) primary key,
	ProductName varchar(50),
	Price float,
	PicturPath varchar(50)
)
go
create table orders
(
	orderID int identity(1,1) primary key,
	ProductID varchar(10),
	userName varchar(20),
	quantity int,
	foreign key (ProductID) references products(ProductID),
	foreign key (userName) references users(userName),
)

go
insert into users values('sa','sa')
insert into users values('admin','admin')
insert into users values('banglv','banglv')
go
insert into Products values('A01C6','Air Condional LG 9300 BTU','4000000','BtuAirConditioner.jpg')
insert into Products values('N01E','Nokia N95','8000000','nokian95.jpg')
insert into Products values('P01','Tu lanh LG 6 lit','4500000','tulanhLG.jpg')
insert into Products values('TSP04','Toshiba-SatelliteL740-1222U-PSK6XL-00D001_23815','9999000','Toshiba-SatelliteL740.jpg')


go
insert into orders values('A01C6','sa',2)
go
select * from users
go
select * from Products
go
select * from orders
go

